
import 'package:flutter/material.dart';
import 'package:flutter_module/page/uzi/chukujilu.dart';
import 'package:flutter_module/page/uzi/kufangweihu.dart';
import 'package:flutter_module/page/uzi/rukujilu.dart';
import 'package:flutter_module/page/uzi/tuihuijilu.dart';
import 'package:flutter_module/page/uzi/zonghe.dart';
import 'package:flutter_module/widget/tap_appbar.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'uzi/wuliaoxinxi.dart';
import 'uzi/wuliaokucun.dart';

class UziPage extends StatefulWidget {
  @override
  _UziPageState createState() => _UziPageState();
}

class _UziPageState extends State<UziPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: TapAppBar(
          TapViewBar(
               Text("物资管理"),

          ),
          Size.fromHeight(ScreenUtil().setHeight(80))
      ),
      body: Column(
        children: <Widget>[
          InkWell(
              onTap: (){
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return WuliaoXinxi();
                }));
              },
              child:getItem("images/uzi/wz1.png", "物料信息")
          ),
          InkWell(
              onTap: (){
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return WuliaoKucn();
                }));
              },
              child:getItem("images/uzi/wz2.png", "物料库存")
          ),
          InkWell(
              onTap: (){
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return RukuJiLu();
                }));
              },
              child:getItem("images/uzi/wz3.png", "入库记录")
          ),
          InkWell(
              onTap: (){
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return ChuKuJiLu();
                }));
              },
              child:getItem("images/uzi/wz4.png", "出库记录")
          ),
          InkWell(
              onTap: (){
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return TuiHuiJiLu();
                }));
              },
              child:getItem("images/uzi/wz5.png", "退回记录")
          ),
           InkWell(
              onTap: (){
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return ZongHe();
                }));
              },
              child:getItem("images/uzi/wz6.png", "综合查询")
          ),
          InkWell(
              onTap: (){
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return KuFangWeiHu();
                }));
              },
              child:getItem("images/uzi/wz7.png", "库房维护")
          ),
          //      getItem(icon, title),getItem(icon, title),getItem(icon, title),getItem(icon, title),

        ],
      ),
    );
  }
  Widget getItem(String icon,String title){
    return Container(
      alignment: Alignment.center,
      height: ScreenUtil().setHeight(100),
      margin: EdgeInsets.only(left: 20),
      decoration: BoxDecoration(
          border: Border(bottom:BorderSide(
              width: 1,color: Colors.black12
          ))
      ),
      child: ListTile(
        leading: Image.asset(icon,width: ScreenUtil().setHeight(60),),
        title: Text(title),
        trailing: IconButton(icon: Icon(Icons.keyboard_arrow_right), onPressed: null),
      ),
    );
  }
}
